You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(circuits): prove synchronized C7 plaintext on Minimum - #2526
Stacked slice of #2050, based on feat/2050-c6-minimum (20 changed files). Merge into main in order after prerequisite reviews; retarget as the stack lands.
Opens exactly the ordered C6 rows, adds c0 once, sums without a second Lagrange weighting, and binds all 50 plaintext coefficients.
Verification: Real native C4/C6/C7 integration; 17,265 C7 gates. Mixed valid shares on the same ciphertext rejected.
Compatibility and limits: disabled sync-insecure-64/minimum definition only. No deployed VK replacement, runtime activation, peer wire or persistent-state migration, or release-counter bump. Existing SS routes remain in place. Source rollback before activation requires no replay/reset. No secure-profile qualification or release authorization is implied.
Protocol review requested: see docs/architecture/threshold-decryption.md, docs/architecture/proof-statements.md, and docs/architecture/circuit-artifacts.md. Independent cryptographic review is pending.
Summary by CodeRabbit
New Features
Added support for synchronized plaintext aggregation, including validation of threshold decryption contributions and message values.
Added circuit configuration and public-input handling for the aggregation workflow.
Documentation
Updated architecture and witness documentation with Minimum C6 and C7 details and proof-statement requirements.
No actionable comments were generated in the recent review.
Walkthrough
The pull request adds a synchronized C7 plaintext-aggregation circuit, its configuration and witness preparation, and public-signal validation. It also updates synchronized decryption tests to use configurable rosters and documents the C7 proof inputs and verification boundaries.
Changes: Synchronized C7 aggregation
Layer / File(s)
Summary
C7 configuration and public signals circuits/lib/src/configs/synchronized/sync_insecure_64.nr, crates/zk/config/src/circuit.rs, crates/zk/config/src/synchronized.rs, crates/zk/config/src/synchronized/public_signals.rs
The synchronized configuration defines C6 and C7 constants and public-input counts. Public-signal decoding checks the C6 rows, their ordered roster and shared commitments, and the encoded message fields.
Witness preparation and polynomial validation crates/zk/witness/src/synchronized/*
The new witness preparation validates contributions and message bounds, then assembles C7 witness data. Shared polynomial helpers validate coefficients and ciphertext components; threshold-decryption preparation uses those helpers.
Aggregation circuit and executable circuits/bin/synchronized/threshold/*, circuits/lib/src/core/synchronized/*, circuits/lib/src/core/threshold/decrypted_shares_aggregation.nr
The circuit validates designated C6 rows and shares, combines c0 with the shares, reconstructs and decodes plaintext coefficients, and checks them against the message. A new package entry point delegates to the circuit implementation.
End-to-end tests and architecture descriptions crates/bfv/threshold/tests/synchronized_dkg.rs, crates/bfv/threshold/tests/synchronized_dkg/threshold_decryption.rs, crates/zk/witness/README.md, docs/architecture/*
Tests use supplied dealer rosters and cover C7 aggregation inputs and rejection cases. Documentation describes C7 inputs, aggregation steps, and proof-verification boundaries.
Issue 2050: The PR implements the synchronized C7 aggregation portion by combining ordered C6 rows, adding c0 once, and checking the plaintext; it does not complete the full issue.
Issue 2456: The PR contributes the synchronized C7 circuit component described in the milestone; it does not add runtime integration.
Issue 2461: The PR changes a synchronized profile and documents proof-verification boundaries, but does not complete the broader qualification work.
Issue 2460: The PR supplies C7 proof-side aggregation behavior that the runtime issue describes as a dependency; it does not implement runtime integration.
Issue 2462: The circuit and tests check set consistency and reject mixed contributions, matching the issue’s set-binding objective; replacement and recovery are not implemented.
Suggested reviewers:zahrajavar, ctrlc03
Merge Risk: Minimal · up to 89327
This change adds a disabled draft circuit for synchronized plaintext aggregation, along with supporting configuration, witness preparation, tests, and documentation. It does not change deployed behavior, and the review found no concrete defect. Independent cryptographic review is still pending, as the author notes.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "feat(circuits): prove synchronized C7 plaintext on Minimum" matches the main change. The PR adds a Minimum-profile circuit (plaintext_aggregation and decrypted_shares_aggregation) that prov…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat(circuits): prove synchronized C7 plaintext on Minimum" matches the main change. The PR adds a Minimum-profile circuit (plaintext_aggregation and decrypted_shares_aggregation) that proves synchronized C7 plaintext by opening ordered C6 rows, adding c0 once, and binding all 50 plaintext coefficients. The title is specific and concise, and it names the profile the change targets. Its scope is limited to the disabled sync-insecure-64/minimum definition, which the title does not need to state.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
Clippy (1.99.1)
Clippy execution failed
Clippy (1.99.1) exceeded its 180-second time budget. Findings from completed work are retained; remaining checks are incomplete.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
documentationImprovements or additions to documentation
1 participant
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked slice of #2050, based on
feat/2050-c6-minimum(20 changed files). Merge into main in order after prerequisite reviews; retarget as the stack lands.Opens exactly the ordered C6 rows, adds c0 once, sums without a second Lagrange weighting, and binds all 50 plaintext coefficients.
Verification: Real native C4/C6/C7 integration; 17,265 C7 gates. Mixed valid shares on the same ciphertext rejected.
Compatibility and limits: disabled
sync-insecure-64/minimumdefinition only. No deployed VK replacement, runtime activation, peer wire or persistent-state migration, or release-counter bump. Existing SS routes remain in place. Source rollback before activation requires no replay/reset. No secure-profile qualification or release authorization is implied.Protocol review requested: see
docs/architecture/threshold-decryption.md,docs/architecture/proof-statements.md, anddocs/architecture/circuit-artifacts.md. Independent cryptographic review is pending.Summary by CodeRabbit